import { RightOutlined, DownOutlined } from '@ant-design/icons-vue';
const iconFun = (props) => {
    console.log(props);
    if (props.record.children.length > 0) {
        if (props.expanded) {
            //有数据-展开时候图标
            return 
                <i
                    style="color:'black';margin-right:8px"
                    onClick={(e) => {
                        props.onExpand(props.record, e);
                    }}
                >
                    <DownOutlined />
                </i>
            
        } else {
            return 
                <i
                    style="color:'black';margin-right:8px"
                    onClick={(e) => {
                        props.onExpand(props.record, e);
                    }}
                >
                    <RightOutlined />
                </i>
            
        }
    }
};
export default iconFun;
